package wang.API;

import java.util.Scanner;

public class UserIn {
    public static void main(String[] args) {
        UserInfo user = new UserInfo();
        Scanner sc = new Scanner(System.in);
        int a = 0;
        for (int i = 0; i < 3; i++) {
            System.out.println("请您输入您的用户名：");
            String UserName = sc.next();
            System.out.println("请您输入您的密码：");
            String PassWord =sc.next();
            if (user.check(UserName,PassWord)){
                System.out.println("恭喜您登录成功");
                break;
            } else {
                a++;
            }
            }
        if (a>=3){
            System.out.println("您尝试次数过多，该用户已锁定");
        }

        }

    }

